package cn.lh.controller;


import cn.lh.config.Resp;
import cn.lh.entity.req.ProductReq;
import cn.lh.entity.vo.ProductTypeVo;
import cn.lh.service.ProductService;
import cn.lh.service.ProductTypeService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 * 产品表 前端控制器
 * </p>
 *
 * @author linhong
 * @since 2025-04-14
 */
@Api(tags = "产品类型")
@Validated
@Slf4j
@RestController
@RequestMapping("/productType")
public class ProductTypeController extends BaseController{

    @Resource
    private ProductTypeService productTypeService;

    @ApiOperation(value = "获取产品列表", notes = "获取产品列表")
    @ApiResponses({
            @ApiResponse(code = 500, message = "接口异常")
    })
    @GetMapping("/getList")
    public Resp<List<ProductTypeVo>> getList(@RequestHeader String authorization){
        return ok(productTypeService.getList());
    }


}

